<{include file="admin/header.html"}>
<{include file="admin/left.html"}>
<fieldset><legend><{$tpl_title}></legend>
<table width="100%" border="0" cellspacing="1" cellpadding="1">

  <tr>
    <th scope="col">编号</th>
    <th scope="col">标题</th>
    <th scope="col">路径</th>
    <th scope="col">操作</th>
  </tr>
<{if $results == ""}>
	<tr>
		<td><center><font color="red">没有找到您要的页面！</font></center></td>
	</tr>
<{else}>
<{foreach from=$results item=one}>
  <tr>
    <td><{$one.cid}></td>
    <td><a href="<{spUrl c=page a=edit cid=$one.cid}>"><{$one.title}></a></td>
    <td><a href="/<{$one.url}>"><{$one.url}></a></td>
    <td>
		<a class="table_icon" title="修改" href="<{spUrl c=page a=edit cid=$one.cid}>"><img src="/template/admin/images/Preferences.png" alt="修改" /></a>
		<a class="table_icon" title="删除" href="javascript:void(0);" onclick="delconfirm(<{$one.cid}>,'<{$one.title}>');"><img src="/template/admin/images/Trash.png" alt="删除" /></a>
	</td>
  </tr>
<{/foreach}>
<{/if}>	

</table>

<{if $pager}>
<ul class="paginator">
共有页面<{$pager.total_count}>条，共有<{$pager.total_page}>页（每页<{$pager.page_size}>条内容）：
<!--在当前页不是第一页的时候，显示前页和上一页-->
<{if $pager.current_page != $pager.first_page}>
<li><a href="<{spUrl c=page a=index page=$pager.first_page}>">前页</a></li>
<li><a href="<{spUrl c=page a=index page=$pager.prev_page}>">上一页</a></li>
<{/if}>
<!--开始循环页码，同时如果循环到当前页则不显示链接-->
<{foreach from=$pager.all_pages item=thepage}>
	<{if $thepage != $pager.current_page}>
		<li><a href="<{spUrl c=page a=index page=$thepage}>"><{$thepage}></a></li>		
	<{else}>
		<li class="current"><a href="<{spUrl c=page a=index page=$thepage}>"><{$thepage}></a></li>		
	<{/if}>
<{/foreach}>
<!--在当前页不是最后一页的时候，显示下一页和后页-->
<{if $pager.current_page != $pager.last_page}>
<li><a href="<{spUrl c=page a=index page=$pager.next_page}>">下一页</a></li>
<li><a href="<{spUrl c=page a=index page=$pager.last_page}>">后页</a></li>
<{/if}>
</ul>
<{/if}>

</fieldset>
<script type="text/javascript">
function delconfirm(id,title){
	if( window.confirm("确定删除“" + title + "”？") ){
		window.location = "<{spUrl c=page a=del}>&cid=" + id;
	}
}
</script>
<{include file="admin/footer.html"}>